package dem1;

import java.util.Arrays;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-03-29
 * Time: 14:26
 */
public class MyArrayList2 {
    private Object[] objects = new Object[10];
    private int siez;

    public <E> boolean add(E... e){
        for (int i = 0; i < e.length; i++) {
            objects[siez] = e[i];
            siez++;
        }
        return true;
    }

    @Override
    public String toString() {
        return "MyArrayList2{" +
                "objects=" + Arrays.toString(objects) +
                ", siez=" + siez +
                '}';
    }
}
